<!-- 选择科室页面 -->
<template>
  <view>
    <TopNavigation leftText="选择科室" rightText="" />
    <view class="wraper">
      <wd-sidebar v-model="active" @change="handleChange">
        <wd-sidebar-item
          v-for="(item, index) in categories"
          :key="index"
          :value="index"
          :label="item.name"
          customClass="leftBox"
        />
      </wd-sidebar>
      <view class="content" :style="`transform: translateY(-${active * 100}%)`">
        <scroll-view
          v-for="(item, index) in categories"
          :key="item.id"
          class="category"
          scroll-y
          scroll-with-animation
          :show-scrollbar="false"
          :scroll-top="scrollTop"
          :throttle="false"
        >
          <wd-cell-group>
            <wd-cell
              v-for="(cell, index) in item.child"
              :key="cell.id"
              :title="cell.name"
              :clickable="true"
              size="large"
              @click="tz(cell.name)"
            />
          </wd-cell-group>
        </scroll-view>
      </view>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { ref, nextTick } from "vue";
import TopNavigation from "@/components/TopNavigation.vue";
import DeptAPI, { Dept } from "@/api/system/dept";
import { LoginPinia } from "@/store";

const loginValue = LoginPinia();
const active = ref<number>(0);
const scrollTop = ref<number>(0);
const categories = ref<Dept[]>([
  {
    id: "6976485709309804544",
    name: "内科",
    child: [
      {
        id: "6976485710874279936",
        name: "心血管内科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485710916222976",
        name: "普通内科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485710924611584",
        name: "神经内科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485710933000192",
        name: "消化内科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485710941388800",
        name: "内分泌科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485710949777408",
        name: "免疫科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485710970748928",
        name: "高压氧科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485710995914752",
        name: "血液科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485711004303360",
        name: "肾病内科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485711012691968",
        name: "呼吸科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485711033663488",
        name: "感染内科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485711042052096",
        name: "过敏反应科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485710979137536",
    name: "外科",
    child: [
      {
        id: "6976485712136765440",
        name: "胸外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485712178708480",
        name: "整形科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485712191291392",
        name: "功能神经外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485712203874304",
        name: "泌尿外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485712212262912",
        name: "肝胆外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485712220651520",
        name: "心血管外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485712229040128",
        name: "乳腺外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485712241623040",
        name: "肛肠科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485712250011648",
        name: "神经外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485712262594560",
        name: "普外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485712342286336",
        name: "胃肠外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485712359063552",
        name: "血管外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485712350674944",
    name: "妇产科学",
    child: [
      {
        id: "6976485713344724992",
        name: "妇产科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485713357307904",
        name: "妇科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485713365696512",
        name: "产科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485713374085120",
        name: "妇科内分泌",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485713386668032",
        name: "妇科肿瘤",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485713395056640",
        name: "妇泌尿科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485713424416768",
        name: "生殖",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485713432805376",
        name: "产前诊断科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485713441193984",
        name: "遗传咨询科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485713449582592",
        name: "计划生育科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485713453776896",
    name: "儿科学",
    child: [
      {
        id: "6976485714674319360",
        name: "小儿内分泌科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714678513664",
        name: "小儿免疫科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714686902272",
        name: "儿科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714695290880",
        name: "新生儿科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714699485184",
        name: "小儿呼吸科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714707873792",
        name: "小儿消化科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714720456704",
        name: "儿童保健科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714724651008",
        name: "小儿神经内科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714733039616",
        name: "小儿心内科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714737233920",
        name: "小儿肾内科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714745622528",
        name: "小儿皮肤科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714749816832",
        name: "小儿耳鼻喉",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714758205440",
        name: "小儿血液科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714762399744",
        name: "小儿感染科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714766594048",
        name: "小儿精神科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714774982656",
        name: "小儿妇科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714795954176",
        name: "小儿外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714800148480",
        name: "小儿泌尿科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714808537088",
        name: "小儿神经外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714812731392",
        name: "小儿整形科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714821120000",
        name: "小儿康复科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714825314304",
        name: "小儿急诊科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714829508608",
        name: "新生儿外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714837897216",
        name: "小儿心外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714842091520",
        name: "小儿胸外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485714850480128",
        name: "小儿骨科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485714858868736",
    name: "骨外科",
    child: [
      {
        id: "6976485716012302336",
        name: "运动医学",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716016496640",
        name: "骨科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716024885248",
        name: "脊柱外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716029079552",
        name: "手外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716037468160",
        name: "创伤骨科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716045856768",
        name: "骨肿瘤科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716054245376",
        name: "骨关节科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716058439680",
        name: "矫形骨科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716066828288",
        name: "足踝外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485716096188416",
    name: "眼科学",
    child: [
      {
        id: "6976485716935049216",
        name: "小儿眼科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716939243520",
        name: "眼底",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716947632128",
        name: "角膜科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716956020736",
        name: "青光眼",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716972797952",
        name: "白内障",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716976992256",
        name: "眼科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716985380864",
        name: "眼整形",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716989575168",
        name: "眼外伤",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485716997963776",
        name: "屈光",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485717002158080",
        name: "眼眶及肿瘤",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485717010546688",
        name: "中医眼科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485717018935296",
        name: "验光",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485717023129600",
    name: "口腔科学",
    child: [
      {
        id: "6976485718012985344",
        name: "口腔科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485718021373952",
        name: "正畸科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485718025568256",
        name: "牙体牙髓科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485718029762560",
        name: "口腔粘膜科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485718033956864",
        name: "颌面外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485718042345472",
        name: "牙周科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485718046539776",
        name: "口腔修复科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485718050734080",
        name: "种植科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485718054928384",
        name: "儿童口腔科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485718008791040",
    name: "耳鼻咽喉头颈科",
    child: [
      {
        id: "6976485718805708800",
        name: "耳鼻喉",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485718822486016",
        name: "耳科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485718839263232",
        name: "头颈外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485718847651840",
        name: "喉科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485718906372096",
        name: "鼻科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485718914760704",
    name: "肿瘤科",
    child: [
      {
        id: "6976485720504401920",
        name: "肿瘤内科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485720516984832",
        name: "肿瘤外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485720521179136",
        name: "放疗科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485720525373440",
    name: "皮肤性病科",
    child: [],
  },
  {
    id: "6976485721271959552",
    name: "男科",
    child: [],
  },
  {
    id: "6976485722094043136",
    name: "皮肤美容",
    child: [],
  },
  {
    id: "6976485722790297600",
    name: "烧伤科",
    child: [],
  },
  {
    id: "6976485723469774848",
    name: "精神心理科",
    child: [
      {
        id: "6976485724283469824",
        name: "药物依赖科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485724296052736",
        name: "双相障碍科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485724300247040",
        name: "精神科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485724308635648",
        name: "心理咨询科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485724317024256",
        name: "中医精神科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485724325412864",
    name: "中医学",
    child: [
      {
        id: "6976485725394960384",
        name: "中医免疫内科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725403348992",
        name: "中医心内科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725407543296",
        name: "中医妇产科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725415931904",
        name: "中医儿科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725424320512",
        name: "中医骨科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725428514816",
        name: "中医皮肤科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725436903424",
        name: "中医内分泌",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725453680640",
        name: "中医消化科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725462069248",
        name: "中医呼吸科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725470457856",
        name: "中医肾病内科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725474652160",
        name: "中医神经内科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725483040768",
        name: "中医肿瘤科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725487235072",
        name: "中医血液科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725495623680",
        name: "中医肝病科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725504012288",
        name: "中医五官科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725508206592",
        name: "中医男科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725516595200",
        name: "针灸科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725533372416",
        name: "中医按摩科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725537566720",
        name: "中医肛肠科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725545955328",
        name: "中医科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725562732544",
        name: "中医外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485725571121152",
        name: "中医乳腺外科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485725550149632",
    name: "中西医结合科",
    child: [],
  },
  {
    id: "6976485727244648448",
    name: "传染病科",
    child: [
      {
        id: "6976485728632963072",
        name: "肝病科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485728637157376",
        name: "艾滋病科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485728641351680",
        name: "结核病科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485728645545984",
    name: "康复医学科",
    child: [
      {
        id: "6976485729312440320",
        name: "康复科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485729320828928",
    name: "麻醉医学科",
    child: [
      {
        id: "6976485730088386560",
        name: "疼痛科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485730100969472",
        name: "麻醉科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485730096775168",
    name: "职业病科",
    child: [],
  },
  {
    id: "6976485730784641024",
    name: "营养科",
    child: [],
  },
  {
    id: "6976485731493478400",
    name: "医学影像学",
    child: [
      {
        id: "6976485732265230336",
        name: "核医学科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485732273618944",
        name: "超声科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485732282007552",
        name: "医学影像科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
  {
    id: "6976485732290396160",
    name: "病理科",
    child: [],
  },
  {
    id: "6976485733007622144",
    name: "护理咨询",
    child: [],
  },
  {
    id: "6976485734316244992",
    name: "康复",
    child: [],
  },
  {
    id: "6976485735054442496",
    name: "营养",
    child: [],
  },
  {
    id: "6976485735691976704",
    name: "心理",
    child: [],
  },
  {
    id: "6976485736883159040",
    name: "用药",
    child: [],
  },
  {
    id: "6976485737717825536",
    name: "其他科室",
    child: [
      {
        id: "6976485738313416704",
        name: "干部诊疗科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485738321805312",
        name: "体检科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485738330193920",
        name: "重症监护室",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
      {
        id: "6976485738334388224",
        name: "急诊科",
        avatar:
          "https://img1.baidu.com/it/u=4097544733,2343621647&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=224",
      },
    ],
  },
]);

function handleChange({ value }: { value: number }) {
  active.value = value;
  scrollTop.value = -1;
  nextTick(() => {
    scrollTop.value = 0;
  });
}

function tz(value: any) {
  loginValue.addSelectDepartment(value);
  uni.navigateTo({ url: "/pages/Describe/index" });
  console.log(loginValue.selectDepartment);
}
</script>

<style lang="scss" scoped>
.wraper {
  display: flex;
  height: calc(100vh - 100rpx);
  overflow: hidden;
}
.content {
  flex: 3;
  background: #fff;
  transition: transform 0.3s ease;
}
.category {
  box-sizing: border-box;
  height: 100%;
}
.leftBox {
  display: flex;
  justify-content: left;
  font-size: 28rpx;
}
</style>
